#include "stdafx.h"
#include "stdwin.h"

#pragma region WARNING_AND_ERROR_MESSAGES

BOOL WarningBox(HWND handle, LPCTSTR message)
{
 MessageBox(handle, message, TEXT("Warning"), MB_ICONINFORMATION);
 return TRUE;
}

BOOL ErrorBox(HWND handle, LPCTSTR message)
{
 MessageBox(handle, message, TEXT("Error"), MB_ICONSTOP);
 return FALSE;
}

#pragma endregion

#pragma region WINDOW_FUNCTIONS

BOOL GetWindowDimensions(HWND window, LPSIZE size)
{
 RECT rect;
 if(!GetWindowRect(window, &rect)) return FALSE;
 size->cx = rect.right - rect.left;
 size->cy = rect.bottom - rect.top;
 return TRUE;
}

BOOL GetClientDimensions(HWND window, LPSIZE size)
{
 RECT rect;
 if(!GetClientRect(window, &rect)) return FALSE;
 size->cx = rect.right - rect.left;
 size->cy = rect.bottom - rect.top;
 return TRUE;
}

#pragma endregion
